/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2025-08-17
 * Time: 17:29
 */
public class demo1 {
    private static int count = 0;

    public static void main(String[] args) {
        Object locker = new Object();

        for (int i = 0; i < 50000; i++) {
            synchronized (locker) {
                synchronized (locker) {
                }
                count++;
            }
        }
        System.out.println(count);
    }
}